import { HTTP } from '../util/http.js'
class EditModel extends HTTP {

  //
  updatePostById({postType='codes',postId,title,content}) {
    
    return this.request({
      method: 'post',
      url: `wp/v2/${ postType }/${ postId }`,
      data: {
        title,
        content
      },
      myHeader: {
        'Authorization': `Bearer ${this.getToken()}`
      }
    })
  }
}
export { EditModel }